package yxy.game.pm2.bean.db.po;

import yxy.apple.db.ResultObjectBuilder;

import java.sql.ResultSet;
import java.util.Date;

public class StairwayRecordPo {

    private String playerCode;
    private Date date;// 时间
    private String recordCode;// 录像code

    private boolean isAttacker;// 玩家是进攻者

    private int rank;// 排名变化

    private String name;// 对手名字
    private int head;// 对手头像
    private int headframe;// 对手头像框
    private int level;// 对手等级
    private long power;// 对手战力

    private String battleResult;
    private long updateTime;

    public static ResultObjectBuilder<StairwayRecordPo> builder = rs -> {
        StairwayRecordPo u = new StairwayRecordPo();
        u.setPlayerCode(rs.getString("pCode"));
        u.setDate(rs.getDate("date"));
        u.setRecordCode(rs.getString("recordCode"));
        u.setAttacker(rs.getBoolean("isAttacker"));
        u.setRank(rs.getInt("rank"));
        u.setName(rs.getString("name"));
        u.setHead(rs.getInt("head"));
        u.setHeadframe(rs.getInt("headframe"));
        u.setLevel(rs.getInt("level"));
        u.setPower(rs.getLong("power"));
        u.setBattleResult(rs.getString("battleResult"));
        u.setUpdateTime(rs.getLong("updateTime"));
        return u;
    };


    public String getPlayerCode() {
        return playerCode;
    }

    public void setPlayerCode(String playerCode) {
        this.playerCode = playerCode;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getRecordCode() {
        return recordCode;
    }

    public void setRecordCode(String recordCode) {
        this.recordCode = recordCode;
    }

    public boolean isAttacker() {
        return isAttacker;
    }

    public void setAttacker(boolean attacker) {
        isAttacker = attacker;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHead() {
        return head;
    }

    public void setHead(int head) {
        this.head = head;
    }

    public int getHeadframe() {
        return headframe;
    }

    public void setHeadframe(int headframe) {
        this.headframe = headframe;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public long getPower() {
        return power;
    }

    public void setPower(long power) {
        this.power = power;
    }

    public String getBattleResult() {
        return battleResult;
    }

    public void setBattleResult(String battleResult) {
        this.battleResult = battleResult;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "StairwayRecordPo{" +
                "playerCode='" + playerCode + '\'' +
                ", date=" + date +
                ", recordCode='" + recordCode + '\'' +
                ", isAttacker=" + isAttacker +
                ", rank=" + rank +
                ", name='" + name + '\'' +
                ", head=" + head +
                ", headframe=" + headframe +
                ", level=" + level +
                ", power=" + power +
                ", battleResult='" + battleResult + '\'' +
                ", updateTime=" + updateTime +
                '}';
    }
}
